
# 商品相关对象

from selenium.webdriver.common.by import By


class GoodsPage():

    # 点击商品详情
    good_detail = (By.CLASS_NAME,"floor-goods-item")        # 列表，获取第1个。

    # 点击加入购物车
    add_cart = (By.ID,"join_cart")

    # 关闭对话框
    close_cart_dialog = (By.CLASS_NAME,"layui-layer-ico")

    # 点击我的购物车
    my_cart = (By.CSS_SELECTOR,"i.share-shopcar-index")


    # 商品名称
    good_name = (By.CLASS_NAME,"detail-ggsl")       # 获取文本

    # 商品价格
    good_price = (By.ID,"goods_price")              # 获取文本

    # 商品数量
    good_num = (By.XPATH,"//input[@id='number' and @name='goods_num']")     # 获取属性值